namespace TMS.SocialNews.Core.Classes
{
    public class Users
    {
        #region "Properties"

        private string _EmailAddress;
        private string _Password;
        private string _UserName;

        public string UserName
        {
            get { return _UserName; }
            set { _UserName = value; }
        }

        public string Password
        {
            get { return _Password; }
            set { _Password = GeneralFunctions.GenerateSHA1Hash(value); }
        }

        public string EmailAddress
        {
            get { return _EmailAddress; }
            set { _EmailAddress = value; }
        }

        #endregion

        #region "Constructors"

        /// <summary>
        /// Initializes a new instance of the <see cref="Users"/> class.
        /// </summary>
        public Users()
        {
            _EmailAddress = "";
            _UserName = "";
            _Password = "";
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="Users"/> class.
        /// </summary>
        /// <param name="UName">User's Username</param>
        /// <param name="Pword">User's Password</param>
        /// <param name="Email">User's Email</param>
        public Users(string UName, string Pword, string Email)
        {
            _EmailAddress = Email;
            _UserName = UName;
            _Password = Pword;
        }

        # endregion
    }
}